package com.heima.datastructure.heap;

/**
 * @author 勾新杰
 * @version 1.0
 * @date 2024/9/5 20:40
 */

public class Friend implements Priority{
    private final String name;
    private final int age;
    private final int priority;
    public Friend(String name, int age, int priority) {
        this.name = name;
        this.age = age;
        this.priority = priority;
    }
    @Override
    public int getValue() {
        return priority();
    }

    @Override
    public int priority() {
        return priority;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }
}
